-- GENERATED SPELL FOR [Arcane Servant] --


function spell0_20478(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(22271,pUnit)
pUnit:RegisterEvent('Sorts_20478', 580, 1)
end

function spell1_20478(pUnit, Event) --@Arcane Volley,n/a--
pUnit:FullCastSpellOnTarget(35255,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20478', 1000, 1)
end

function Sorts_20478(pUnit, Event)
local choix_sorts_20478 = math.random(0, 1)
if choix_sorts_20478 == 0 then
pUnit:RegisterEvent('spell0_20478', 1, 1)
end
if choix_sorts_20478 == 1 then
pUnit:RegisterEvent('spell1_20478', 1, 1)
end
end

function mob20478_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20478', math.random(1500, 3000), 1)
end

function mob20478_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20478_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20478_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20478, 1, 'mob20478_Action')
RegisterUnitEvent(20478, 2, 'mob20478_Leave')
RegisterUnitEvent(20478, 3, 'mob20478_Kill')
RegisterUnitEvent(20478, 4, 'mob20478_Die')
